#include "core.h"
#include <cstdio>
#include <cstring>
#include <string>

int main() {
	int len = 4;
	//char* words[] = { (char*)"algebra",
	//				(char*)"aoob",
	//				(char*)"booc",
	//				(char*)"cood",
	//				(char*)"cooe",
	//				(char*)"coof",
	//				(char*)"dppe",
	//				(char*)"dppf",
	//				(char*)"dppg",
	//				(char*)"eoof",
	//				(char*)"eoog",
	//				(char*)"epph",
	//				(char*)"eooi",
	//				(char*)"foof",
	//				(char*)"foog",
	//				(char*)"fpph",
	//				(char*)"fooi",
	//				(char*)"fooj",
	//				(char*)"gook",
	//				(char*)"goog",
	//				(char*)"gpph",
	//				(char*)"gooi",
	//				(char*)"gooj",
	//				(char*)"elephant",
	//				(char*)"under",
	//				(char*)"fox",
	//				(char*)"dog",
	//				(char*)"moon",
	//				(char*)"keam",
	//				(char*)"tricy",
	//				(char*)"xseudopseudohypoparathyroidisz",

	//
	//
	//};
	 
		   
		     
		       
	char* words[] = { (char*)"ba",
				(char*)"ca",
				(char*)"ac",
				(char*)"cb",
				(char*)"bc",
				(char*)"da",
				(char*)"ad",
				(char*)"db",
				(char*)"bd",
				(char*)"dc",
				(char*)"cd",
				(char*)"ea",
				(char*)"ae",
				(char*)"eb",
				(char*)"be",
				(char*)"ec",
				(char*)"ce",
				(char*)"ed",
				(char*)"de"
	};
	int ret = 6;
	char* _result_buf = (char*)malloc(0x1000);
	char** _result = (char**)malloc(sizeof(char*) * 100);
	_result[0] = _result_buf;
	int _num = gen_chain_char(words, len, _result,'\0','\0',true);

//	int len = 4;
//	char *words[] = {"woo", "oom", "moon", "noox"};
//	char *_result_buf = (char *) malloc(0x1000);
//	char **_result = (char **) malloc (sizeof (char *) * 100);
//	*_result = _result_buf;
//	int _num = gen_chains_all(words, len, _result);
//    printf("%d\n", _num);
//    for (int i = 0; i < _num; i++) {
//        printf("%s\n", _result[i]);
//    }
	return 0;
}
